From: Liam Hupfer Date: Thu, 26 Jun 2025 03:47:34 +0000 (-0500) Subject: bug#78901: [PATCH] js-ts-mode: Fix auto-mode-alist regexp X-Git-Tag: archive/raspbian/1%30.2+1-2+rpi1^2~2^2~24^2~47 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=6299eb0fe54c87bcbb0f6ab4de3e4f9e250d4586;p=emacs.git bug#78901: [PATCH] js-ts-mode: Fix auto-mode-alist regexp Align the js-ts-mode entry with the javascript-mode entries in the default auto-mode-alist value in lisp/files.el. Otherwise, js-ts-mode is not associated with .js files. * lisp/progmodes/js.el (js-ts-mode): Fix auto-mode-alist regexp. Fixes: 2023-01-20 6b2f85caa6ca "Make tree-sitter based modes optional" --- diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 3e789218fde..edb77db9bfe 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -3961,7 +3961,7 @@ See `treesit-thing-settings' for more information.") (treesit-major-mode-setup) (add-to-list 'auto-mode-alist - '("\\(\\.js[mx]\\|\\.har\\)\\'" . js-ts-mode)))) + '("\\(\\.js[mx]?\\|\\.har\\)\\'" . js-ts-mode)))) (derived-mode-add-parents 'js-ts-mode '(js-mode))